import categoryApi from "./categoryApi"
import productApi from "./productApi"
import loginApi from "./loginApi"
import orderApi from "./orderApi"
import axios from "axios"
axios.interceptors.response.use(response => {
    if(response.status === 200){
        console.log(response)
        if(response.data=="you need login"){
            localStorage.removeItem("ms_username")
        }
        return response;
    }else{
        Promise.reject();
    }
}, error => {
    console.log(error);
    return Promise.reject();
})

export default{
    //类目接口
    categoryApi,
    //商品接口
    productApi,
    //登录接口
    loginApi,
    //订单接口
    orderApi,
}